<?php
/*
 * File Name : basePage.php
 * Description : Creates the common Header and Footer for Good Mojo Application Pages
 * Created By : Pratibha Awasthi
 * 				Abhiraj Chauhan
 */

include_once "dbconnection.php";

class basePage extends dbconnection{

	// Constructor
	public function __construct()
    {
    }
    
    public function include_transalte(){
    	
    }
    
    // Create a common header for all the pages of the application
	public function header(){
	
		echo <<<EHEADER
		<!DOCTYPE html>
		<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
		<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
		<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
		<!--[if (gt IE 9)|!(IE)]><!-->
		
		<html class="js" lang="en"><!--<![endif]--><head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		 
		<meta property="og:site_name" content="Good Mojo">
		
		<meta property="og:image" content="http://cdn.shopify.com/s/files/1/0041/8772/t/2/assets/logo.png?100098">
		
		<title>
		Good Mojo
		</title>
		
		<script src="../template/shopify_stats.js" async=" " type="text/javascript"></script>
			<script type="text/javascript">      var Shopify = Shopify || {};
			Shopify.shop = "thegoodmojo.myshopify.com";
			Shopify.theme = {
			"name":"Radiance","id":2544662};
		</script>
		
		
		<script type="text/javascript">var __st={
			"a":418772,"offset":-28800,"u":"a5f5e90c7342"};</script>
			<script type="text/javascript">    //<![CDATA[
			(function() {
			function asyncLoad() {
				var urls = ["//stats.shopify.com/javascripts/shopify_stats.js?v=3"];
				for (var i = 0; i < urls.length; i++) {
					var s = document.createElement('script');
					s.type = 'text/javascript';
					s.async = true;
					s.src = urls[i];
					var x = document.getElementsByTagName('script')[0];
					x.parentNode.insertBefore(s, x);
				}
			}
			window.attachEvent ? window.attachEvent('onload', asyncLoad) : window.addEventListener('load', asyncLoad, false);
		})();
		//]]>
		</script>
		
		<link href="../template/style.css" rel="stylesheet" type="text/css" media="all">
		<script src="../template/modernizr.js" type="text/javascript"></script>
		<script src="../template/option_selection.js" type="text/javascript"></script>
		
		</head>
EHEADER;
		
		echo <<< TRANSLATE
    	<div id="google_translate_element">
   
    	<script>
    	function googleTranslateElementInit() {
    		new google.translate.TranslateElement({
    			pageLanguage: 'en'
    		}, 'google_translate_element');
    	}
    	</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    	</div>
TRANSLATE;
	
	}
	
	// Creates the top menu for the pages visible to a Donor
	public function top_menu_donor(){
		
		echo <<<EBODY
		<body class="templateIndex">
		 <div class="wrapper" id = "base_page">
		  <!-- Header -->
		  <header id="top" class="clearfix">
		  	<h1 id="site-title">
		       <a href="index.php" title="Home">
		           <img src="../template/logo.png" alt="Good Mojo"> 
		       </a>
		    </h1>
		      
		    <nav id="top-menu" class="clearfix">
		      <ul>
		         <li class="first">
		             <a href="donor.php">Donor Profile</a>
		         </li>
		         <li class="second">
		             <a href="Agency.php">Search Agency</a>
		         </li>
		         <li class="third">
		             <a href="attachcompany.php">Attach to Company</a>
		         </li>
		         <li class="last">
		             <a href="company.php">Invite Company</a>
		         </li>
		         <li class="fifth">
		             <a href="inputInviteFriends.php">Invite Friends</a>
		         </li>
		      </ul>
		
		      <!--
		      <form id="header-search" action="/search" method="get">
		          <label for="top-search-input" class="visuallyhidden">Search</label>
		          <input id="top-search-input" name="q" class="search-input" accesskey="4" autocomplete="off" placeholder="Search" type="text">
		          <input id="top-search-submit" class="search-submit ir" value="Search" type="submit">
		      </form>
			  -->
		      
		    </nav>
		
		    <!--
		    <div id="umbrella">
		       <ul>          
		         <li class="cart-link">
		            <a href="#" class="num-items-in-cart">
		              <span class="icon">
		               0 items
		              </span>
		            </a>             
		         </li>
				 <li class="checkout-link">
		            <a href="#" class="btn">Checkout</a>              
		         </li>
		      </ul>
		   </div><!-- /#umbrella -->
		  
		  <iframe src="https://www.facebook.com/plugins/like.php?href=http://localhost/good-mojo-donation/trunk/src/SignIn.php"
		        scrolling="no" frameborder="0"
		        style="border:none; width:450px; height:80px">
		  </iframe>
		</header>
		</div>
		
EBODY;
	}
	
	// Creates the top menu page visible to all the users logged in as an Agency
	
	public function top_menu_agency(){
		
		echo <<<EBODY
		<body class="templateIndex">
		 <div class="wrapper" id = "base_page">
		  <!-- Header -->
		  <header id="top" class="clearfix">
		  	<h1 id="site-title">
		       <a href="index.php" title="Home">
		           <img src="../template/logo.png" alt="Good Mojo"> 
		       </a>
		    </h1>
		      
		    <nav id="top-menu" class="clearfix">
		      <ul>
		         <li class="">
		             <a href="AgencyProfile.php">Agency Profile</a>
		         </li>
		         <li class="">
		             <a href="inputVerifyAddress.php">Verify Address</a>
		         </li>
		         <!--<li class="last">
		             <a href="company.php">Invite Company</a>
		         </li> -->
		      </ul>
			  
		      <!--
		      <form id="header-search" action="/search" method="get">
		          <label for="top-search-input" class="visuallyhidden">Search</label>
		          <input id="top-search-input" name="q" class="search-input" accesskey="4" autocomplete="off" placeholder="Search" type="text">
		          <input id="top-search-submit" class="search-submit ir" value="Search" type="submit">
		      </form>
		      -->
		      
		    </nav>
		
		    <!--
		    <div id="umbrella">
		       <ul>          
		         <li class="cart-link">
		            <a href="#" class="num-items-in-cart">
		              <span class="icon">
		               0 items
		              </span>
		            </a>             
		         </li>
				 <li class="checkout-link">
		            <a href="#" class="btn">Checkout</a>              
		         </li>
		      </ul>
		     </div><!-- /#umbrella -->
		     
		     
		  <iframe src="https://www.facebook.com/plugins/like.php?href=http://localhost/good-mojo-donation/trunk/src/SignIn.php"
		        scrolling="no" frameborder="0"
		        style="border:none; width:450px; height:80px">
		  </iframe>
		</header>
		</div>
		
EBODY;
	}
	
	// The top menu page for all the pages visible when a compnay logs in to the application
	public function top_menu_company(){
		
		echo <<<EBODY
		<body class="templateIndex">
		 <div class="wrapper" id = "base_page">
		  <!-- Header -->
		  <header id="top" class="clearfix">
		  	<h1 id="site-title">
		       <a href="index.php" title="Home">
		           <img src="../template/logo.png" alt="Good Mojo"> 
		       </a>
		    </h1>
		      
		    <nav id="top-menu" class="clearfix">
		      <ul>
		         <li class="first">
		             <a href="company_profile.php">Company Profile</a>
		         </li>
		      </ul>
			 
		      <!--
		      <form id="header-search" action="/search" method="get">
		          <label for="top-search-input" class="visuallyhidden">Search</label>
		          <input id="top-search-input" name="q" class="search-input" accesskey="4" autocomplete="off" placeholder="Search" type="text">
		          <input id="top-search-submit" class="search-submit ir" value="Search" type="submit">
		      </form>
		      -->
		      
		    </nav>
		
		    <!--
		    <div id="umbrella">
		       <ul>          
		         <li class="cart-link">
		            <a href="#" class="num-items-in-cart">
		              <span class="icon">
		               0 items
		              </span>
		            </a>             
		         </li>
				 <li class="checkout-link">
		            <a href="#" class="btn">Checkout</a>              
		         </li>
		      </ul>
		     </div><!-- /#umbrella -->
		    
		    
		  <iframe src="https://www.facebook.com/plugins/like.php?href=http://localhost/good-mojo-donation/trunk/src/SignIn.php"
		        scrolling="no" frameborder="0"
		        style="border:none; width:450px; height:80px">
		  </iframe>
		</header>
		</div>
				
EBODY;
	}
	
	// Creates the top menu for the login page
	public function topmenu_login(){
		
		echo <<<EBODY
		<body class="templateIndex">
		 <div class="wrapper" id = "base_page">
		  <!-- Header -->
		  <header id="top" class="clearfix">
		  	<h1 id="site-title">
		       <a href="index.php" title="Home">
		           <img src="../template/logo.png" alt="Good Mojo"> 
		       </a>
		    </h1>
		      
		    <nav id="top-menu" class="clearfix">
		    
		    <h2> Login to Good Mojo Application </h2>
		      <ul>
		         <li class="first">
		             <a href="SignIn.php">Sign In</a>
		         </li>
		         <li class="">
		             <a href="SignUp.php">New Users - Sign Up</a>
		         </li>
		      </ul>
			  
		      <!--
		      <form id="header-search" action="/search" method="get">
		          <label for="top-search-input" class="visuallyhidden">Search</label>
		          <input id="top-search-input" name="q" class="search-input" accesskey="4" autocomplete="off" placeholder="Search" type="text">
		          <input id="top-search-submit" class="search-submit ir" value="Search" type="submit">
		      </form>
		      -->
		      
		    </nav>
		
		    <!--
		    <div id="umbrella">
		       <ul>          
		         <li class="cart-link">
		            <a href="#" class="num-items-in-cart">
		              <span class="icon">
		               0 items
		              </span>
		            </a>             
		         </li>
				 <li class="checkout-link">
		            <a href="#" class="btn">Checkout</a>              
		         </li>
		      </ul>
		     </div><!-- /#umbrella -->
		
		     
		</header>
		</div>
				
EBODY;
	}
	
	// Common fooyer for all the pages of the application
	public function footer(){

		echo <<<EFOOTER
		<!-- Footer -->
		<footer id="bottom">
		
		<div id="footer-left">
		    <ul id="footer-nav" class="clearfix">
		    </ul>
		    <p>� 2012 <a href="#">Good Mojo</a>. All Rights Reserved.<br></p>
		</div>
		
		<div id="footer-right">
		    <ul id="sm-icons" class="clearfix">
		        <li id="sm-youtube"><a href="http://www.youtube.com/" class="ir">YouTube</a></li>
		        <li id="sm-flickr"><a href="http://www.flickr.com/" class="ir">Flickr</a></li>
		        <li id="sm-twitter"><a href="http://www.twitter.com/" class="ir">Twitter</a></li>
		        <li id="sm-facebook"><a href="http://www.facebook.com/" class="ir">Facebook</a></li>
		    </ul>
		</div>
		
		</footer> 
		
		</div><!-- /.wrapper -->
		
		<script src="../template/jquery_002.js"></script>
		
		<!--[if lt IE 8]>
		<script>
		  // IE 6+7 do not calculate the width of the #umbrella properly
		  $('#umbrella').width( $('#umbrella ul').width() );
		</script>
		<![endif]-->
		    
		<script src="../template/jquery.js" type="text/javascript"></script>    
		
		<script>
		      $(".tweets-wrapper").tweet(
		        {
		          count: 4,
		          username: "shopify",
		          loading_text: "loading tweets...",
		          ../template: function(i){ return i["text"]
		        }    
		      });
		</script>
		  
		<script src="../template/enhance.js" type="text/javascript"></script>
		<script src="../template/hoverintent.js" type="text/javascript"></script>
		<script src="../template/radiance.js" type="text/javascript"></script> 
		<script src="../template/api.js" type="text/javascript"></script>
		    
		</body></html>
EFOOTER;
		
	}
	
}

?>